package com.demo.pojo;

import java.math.BigDecimal;

/**
 * @author WuLiangHang
 */
public class OrderItem {
    private Long id;
    private Long productId;
    private Integer amount;
    private Long orderId;
    private BigDecimal price;
    private Product product;

    public OrderItem() {
    }

    public OrderItem(Long id, Long productId, Integer amount, Long orderId) {
        this.id = id;
        this.productId = productId;
        this.amount = amount;
        this.orderId = orderId;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "OrderItem{" +
                "id=" + id +
                ", productId=" + productId +
                ", amount=" + amount +
                ", orderId=" + orderId +
                ", price=" + price +
                ", product=" + product +
                '}';
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }
}
